Skip to content

Conversation

@0237h
Copy link
Collaborator

@0237h 0237h commented Jan 15, 2025

Using import.meta.url to resolve local file path and directories can lead to issues when special characters are percent-encoded in the url.

This fix uses the fileURLToPath native method to properly parse local urls to file paths.

Closes #1881

0237h added 2 commits January 15, 2025 12:37
Using `import.meta.url` to resolve local file path and directories can lead
to issues when special characters are percent-encoded in the url.

This fix uses the `fileURLToPath` native method to properly parse local urls
to file paths.
@0237h 0237h self-assigned this Jan 15, 2025
@changeset-bot
Copy link

changeset-bot bot commented Jan 15, 2025

🦋 Changeset detected

Latest commit: 85e72bb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@graphprotocol/graph-cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@0237h 0237h requested a review from YaroShkvorets January 15, 2025 17:41
@YaroShkvorets YaroShkvorets self-requested a review January 16, 2025 21:23
Copy link
Collaborator

@YaroShkvorets YaroShkvorets left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@YaroShkvorets YaroShkvorets merged commit bcaad5e into graphprotocol:main Jan 21, 2025
8 checks passed
incrypto32 pushed a commit that referenced this pull request Jan 30, 2025
* Fix `import.meta.url` not being parsed as path properly

Using `import.meta.url` to resolve local file path and directories can lead
to issues when special characters are percent-encoded in the url.

This fix uses the `fileURLToPath` native method to properly parse local urls
to file paths.

* Add changeset

* Remove regex and adjust path

* remove unnecessary platform check

---------

Co-authored-by: YaroShkvorets <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

graph init: whitespace in directory name

2 participants